Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Properly decode cross domain links #743

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Conversation

twoldanski
Copy link
Collaborator

Resolves: #741

@coveralls
Copy link

coveralls commented Jun 25, 2024

Pull Request Test Coverage Report for Build 9665076017

Details

  • 36 of 51 (70.59%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 66.175%

Changes Missing Coverage Covered Lines Changed/Added Lines %
Classes/Event/Listener/AfterLinkIsGeneratedListener.php 36 51 70.59%
Totals Coverage Status
Change from base Build 9252900630: 0.09%
Covered Lines: 988
Relevant Lines: 1493

💛 - Coveralls

@kitzberger
Copy link
Contributor

@twoldanski, thanks for fixing this. I can confirm this is working 💪

@lukaszuznanski lukaszuznanski merged commit 3f6743f into master Jul 2, 2024
8 checks passed
@lukaszuznanski lukaszuznanski deleted the bugfix/741 branch July 2, 2024 15:49
Comment on lines +112 to +116
if (($linkDetails['pageuid'] ?? '') === 'current') {
return $event->getContentObjectRenderer()->getRequest()->getAttribute('site');
}

return $this->siteFinder->getSiteByPageId((int)$linkDetails['pageuid']);
Copy link
Contributor

@kitzberger kitzberger Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@twoldanski, @lukaszuznanski, for custom typolinks pageuid isn't set and triggers a PHP Warning: Undefined array key "pageuid".

Maybe use ($linkDetails['pageuid'] ?? 'current') === 'current') in line 112 to prevent that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See separate issue: #762

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cross domain links not generated correctly for all possible TS configurations
4 participants